﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YunSpace.Application.Email
{
    public class EmailBody
    {
        /// <summary>
        /// 场地报价模板
        /// </summary>
        /// <param name="url">场地图片地址</param>
        /// <param name="name">场地名称</param>
        /// <param name="price">报价</param>
        /// <returns></returns>
        public static string InitEmailPriceBody(string url, string name, string price)
        {
            string str = string.Format(@"<div style = 'position: relative;border-bottom: solid 1px #2B75BB;overflow: hidden;padding: 20px 0;'>
                         <div style = 'height: 100%;position: absolute;background: #eee;z-index: -1;'></div>
                          <div style = 'padding: 15px 10px;'>   
                               <img style = 'z-index:999;float: left;width: 400px;height:200px;' src = '{0}' title = '没图片' />
                                    <div style = 'float: left;width: 48%;padding-left: 2%;'>
                                         <p>{1}</p>
                                            <p style = 'border:1px solid #D8D8D8;'></p>
                                             <div style = 'font-size: 12px;color: #4A4A4A;'>
                                                   <p style='color:#A50000;font-size:20px;'> 市场价: ￥{2} </p>
                                                      
                                                                  </div>
                                                              </div>
                                                          </div>
                                                      </div>", url, name, price);
            return str;
        }

        /// <summary>
        /// 场地预定模板
        /// </summary>
        /// <param name="url">场地图片地址</param>
        /// <param name="name">场地名称</param>
        /// <param name="time">搭建时间</param>
        /// <param name="activitytime">活动时间</param>
        /// <returns></returns>
        public static string InitEmailTalksBody(string url, string name, string time, string activitytime)
        {
            string str = string.Format(@"<div style = 'position: relative;border-bottom: solid 1px #2B75BB;overflow: hidden;padding: 20px 0;'>
                         <div style = 'height: 100%;position: absolute;background: #eee;z-index: -1;'></div>
                          <div style = 'padding: 15px 10px;'>   
                               <img style = 'z-index:999;float: left;width: 400px;height:200px;' src = '{0}' title = '没图片' />
                                    <div style = 'float: left;width: 48%;padding-left: 2%;'>
                                         <p>{1}</p>
                                            <p style = 'border:1px solid #D8D8D8;'></p>
                                             <div style = 'font-size: 12px;color: #4A4A4A;'>
                                                   <p style='color:#4A4A4A;font-size:12px;'>搭建时间：{2}</p>
                                                       <p style='color:#4A4A4A;font-size:12px;'>活动时间：{3}</p>
                                                                  </div>
                                                              </div>
                                                          </div>
                                                      </div>", url, name, time, activitytime);
            return str;
        }

        /// <summary>
        /// 订单完成模板
        /// </summary>
        /// <param name="url">场地图片地址</param>
        /// <param name="name">场地名称</param>
        /// <param name="time">搭建时间</param>
        /// <param name="activitytime">活动时间</param>
        /// <returns></returns>
        public static string InitEmailFinishBody(string url, string name, string time, string activitytime)
        {
            string str = string.Format(@"<div style = 'position: relative;border-bottom: solid 1px #2B75BB;overflow: hidden;padding: 20px 0;'>
                         <div style = 'height: 100%;position: absolute;background: #eee;z-index: -1;'></div>
                          <div style = 'padding: 15px 10px;'>   
                               <img style = 'z-index:999;float: left;width: 400px;height:200px;' src = '{0}' title = '没图片' />
                                    <div style = 'float: left;width: 48%;padding-left: 2%;'>
                                         <p>{1}</p>
                                            <p style = 'border:1px solid #D8D8D8;'></p>
                                             <div style = 'font-size: 12px;color: #4A4A4A;'>
                                                     <p style='color:#4A4A4A;font-size:12px;'>搭建时间：{2}</p>
                                                       <p style='color:#4A4A4A;font-size:12px;'>活动时间：{3}</p>
                                                                  </div>
                                                              </div>
                                                          </div>
                                                      </div>", url, name, time, activitytime);
            return str;
        }

        /// <summary>
        /// 场地推荐
        /// </summary>
        /// <param name="url">场地图片地址</param>
        /// <param name="name">场地名称</param>
        /// <param name="address">地址</param>
        /// <param name="area">使用面积</param>
        /// <param name="Max">容纳人数</param>
        /// <param name="height">空间层高</param>
        /// <param name="accept_weight">空间承重</param>
        /// <param name="site_type">场地类型</param>
        /// <returns></returns>
        public static string InitEmailBody(string url, string name, string address, string area, string Max, string height, string accept_weight, string site_type)
        {
            string str = string.Format(@"<div style = 'position: relative;border-bottom: solid 1px #2B75BB;overflow: hidden;padding: 20px 0;'>
                         <div style = 'height: 100%;position: absolute;background: #eee;z-index: -1;'></div>
                          <div style = 'padding: 15px 10px;'>   
                               <img style = 'z-index:999;float: left;width: 400px;height:200px;' src = '{0}' title = '没图片' />
                                    <div style = 'float: left;width: 48%;padding-left: 2%;'>
                                         <p>{1}</p>
                                            <p style = 'border:1px solid #D8D8D8;'></p>
                                             <div style = 'font-size: 12px;color: #4A4A4A;'>
                                                  <p> 地理位置: {2} </p>
                                                       <p> 使用面积: {3}</p>
                                                          <p> 容纳人数: {4}人 </p>
                                                             <p> 空间层高: {5} </p>
                                                                <p> 空间承重: {6}</p>
                                                                   <p> 场地类型: {7} </p>
                                                                  </div>
                                                              </div>
                                                          </div>
                                                      </div>", url, name, address, area, Max, height, accept_weight, site_type);
            return str;
        }
    }
}
